package com.ftg.learn.chapter08.baidicheng;

/**
 * 交通工具船
 *
 * @author lijiaxin
 * @version 1.0
 * @date 2023/7/21 15:26
 */

public class Boat {

    private String name;

    /**
     * 船的移动方法   舟
     */
    public void move(String startTime, Place start, Place end, Human human, String endTime) {
        System.out.println("各位乘客大家好，欢迎乘坐" + this.getName() + ",本次航程" + startTime + "出发，经由" + start.getName() + "发往" + end.getName());

        System.out.println("已出发......");
        System.out.println(human.getName() + "走了一圈");

        Scenery scenery = new Scenery();
        scenery.setName("彩云");

        human.look(scenery);

        Scenery scenery1 = new Scenery();
        scenery1.setName("万重山");

        human.look(scenery1);

        Ape a1 = new Ape();

        human.listen(a1);

        System.out.println("经过了" + endTime + "我们到了" + end.getName());

    }


    /**
     * 开放一个公共的方法 access method
     * 设置
     * set  setter method
     * 获取
     * get getter method
     */
    public void setName(String name) {
        // this super
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

}
